<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>会员信息统计页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>CSS/style.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>JS/jquery-ui-1.11.2/jquery-ui.css">
	<script type="text/javascript" src="<%=basePath%>JS/jquery-ui-1.11.2/external/jquery/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath%>JS/jquery-ui-1.11.2/jquery-ui.js"></script>
  	<script type="text/javascript" src="<%=basePath%>JS/fusionChart/js/FusionCharts/FusionCharts.js"></script>

  </head>
  
  <body>
    <div id="head-search">
   	 	<span class="home-path"></span>
   	 	<span class="path-font">会员信息管理&nbsp;&nbsp;>>&nbsp;&nbsp;统计会员信息</span>
   	</div>
   	<div class="statisticleft">
   		<button class="staticoption" onclick="geneCharts('college','按会员所在学院统计','Column2D.swf')">所在学院</button>
   		<button class="staticoption" onclick="javascript:geneCharts('indate','按会员入校年份统计','Line.swf')">入学年份</button>
   		<button class="staticoption" onclick="javascript:geneCharts('schooladdr','按会员学校住址统计','Column3D.swf')">学校住址</button>
   		<button class="staticoption" onclick="javascript:geneCharts('homeAddr','按会员家庭住址统计','Pie3D.swf')">家庭住址</button>
   		<button class="staticoption" onclick="javascript:geneCharts('shschool','按会员毕业高中统计','Pie2D.swf')">毕业高中</button>
   	</div>
   	<div class="statisticright">
   		<div id="showchart"></div>
   </div>
   	
  </body>
  <script type="text/javascript">

		function geneCharts(flag,title,type){
  			$.ajax({
				url:"<%=basePath%>getStatisticDataAction?flag="+flag,
				type:'GET',
				dataType:'json',
				timeout:1000,
				beforeSend:function(){},
				error:function(){},
				success:function(datas){
						var mydata = {
		  				"chart":{"baseFont":"Times New Roman","caption":title,"yaxisname":"人数"},
		  				"data":datas};
						var myChart = new FusionCharts("<%=basePath%>JS/fusionChart/Charts/"+type, "ChartId_flash", "560", "400", "0", "1" );
						myChart.setJSONData(mydata);
						myChart.render("showchart");
						}
			});
  		}
 
  </script>
</html>
